package org.orz.cloud.lock.zookeeper;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.locks.InterProcessMutex;

/**
 * 可重入互斥锁
 * 目前继承 {@link InterProcessMutex}主要是为了获取到锁的路径
 * 暂时没别的作用
 */
public class ZkProcessMutex extends InterProcessMutex {

	/**
	 * 继承父类的构造方法
	 * @param client zookeeper客户端对象
	 * @param path 锁的路径
	 */
	public ZkProcessMutex(CuratorFramework client, String path) {
		super(client, path);
	}

	/**
	 * 获取锁的路径
	 * @return 锁的路径
	 */
	public String getZkLockPath(){
		return this.getLockPath();
	}
}
